package com.zm.demo.springsec.web.config;

import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;

/**
 * @author zoum
 * @create 2019/6/5 18:09
 */
public class WebSecurityConfig {


    public void test(HttpSecurity http){
//        ((HttpSecurity)((HttpSecurity)((ExpressionUrlAuthorizationConfigurer.AuthorizedUrl)
//                ((ExpressionUrlAuthorizationConfigurer.AuthorizedUrl)http.antMatcher("/**")
//                        .authorizeRequests().antMatchers("this.permits".split(",")))
//                        .permitAll().anyRequest()).authenticated().and()).headers().frameOptions().disable().and())
//                .addFilterBefore(this.oauth2SsoFilter(), BasicAuthenticationFilter.class)
//                .addFilterAfter(new UserContextFilter(), UsernamePasswordAuthenticationFilter.class)
//                .addFilterAfter(new RefererFilter(), UserContextFilter.class)
//                .addFilterAfter(new ApiAuthorizationFilter(), UserContextFilter.class)
//                .csrf().csrfTokenRepository(this.cookieCsrfTokenRepository())
//                .requireCsrfProtectionMatcher(this.csrfSecurityRequestMatcher());

    }
}
